package kuzmenkov.oip.model.dao.hibernate;

import kuzmenkov.oip.model.User;
import org.springframework.dao.DataAccessException;

import java.util.List;

/**
 * Interface describes accessing to the database table "user"
 * User: Michael Kuzmenkov
 * Date: 16.03.2009
 * Time: 3:47:52
 */
public interface UserDao extends GenericDao<User,Long>{
    /**
     * Finds users which have given name
     * @param name
     * @return
     * @throws DataAccessException
     */
    List<User> findByName (String name) throws DataAccessException;

    List<User> findByEmail(String email) throws DataAccessException ;
}
